package com.jtcl.module.service;

import com.jtcl.enums.OrderState;
import com.jtcl.module.dto.OrderDTO;
import com.jtcl.module.mapper.OrderMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author sjt
 * @since 2021-02-26 13:02
 */
@Service
public class OrderService {

    @Autowired
    OrderMapper orderMapper;

    public int submitOrder(OrderState state) {
        OrderDTO orderDTO = new OrderDTO();
        orderDTO.setState(state);
        orderMapper.insert(orderDTO);
        return 1;
    }

}


